<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>物品管理</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="css/Select.css">
</head>
<script type="text/html" id="btnDemo">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" id="btndel">下架</a>
    <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="detail" id="btndetails">详情</a>
</script>
<body>
<form>
    <div id="divHname">
        <input type="text" name="Hname" id="Hname" placeholder="请输入物品名称……" class="layui-input"
               style="width: 45%">
        <input type="button" value="搜索" id="btnSelect" class="layui-btn">
        <input type="button" name="btnAdd" id="btnAdd" value="添加物品" class="layui-btn">
    </div>
    <table class="layui-table" id="tbl" lay-filter="tbl">
    </table>
    <div id="OpenForm" style="display: none">
        <form class="layui-form" id="FormOpen" lay-filter="example" style="margin: 1rem">

            <div class="layui-form-item">
                <label class="layui-form-label">物品id</label>
                <div class="layui-input-block">
                    <input type="text" id="Hitem_id" name="Hid"
                           autocomplete="off" class="layui-input"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">物品名称</label>
                <div class="layui-input-block">
                    <input type="text" id="Hitem_name" name="Hname"
                           autocomplete="off" class="layui-input"/>
                </div>
            </div>

            <div class="layui-form-item layui-form" >
                <label class="layui-form-label">物品类型</label>
                <div class="layui-input-block">
                   <select id="Hitem_Type" name="Tid">
                       <!-- 电子产品 -->
                       <optgroup label="电子产品">
                           <option value="5">手机</option>
                           <option value="6">电脑</option>
                           <option value="7">电视机</option>
                           <option value="8">耳机</option>
                       </optgroup>

                       <!-- 家具 -->
                       <optgroup label="家具">
                           <option value="9">桌椅</option>
                           <option value="10">床</option>
                           <option value="11">书柜</option>
                       </optgroup>

                       <!-- 书籍 -->
                       <optgroup label="书籍">
                           <option value="12">教材</option>
                           <option value="13">小说</option>
                           <option value="14">杂志</option>
                       </optgroup>

                       <!-- 运动器材 -->
                       <optgroup label="运动器材">
                           <option value="15">跑步机</option>
                           <option value="16">哑铃</option>
                           <option value="17">瑜伽垫</option>
                       </optgroup>
                   </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">物品价格</label>
                <div class="layui-input-block">
                    <input type="text" id="Hitem_price" name="Hprice"
                           autocomplete="off" class="layui-input"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">物品成色</label>
                <div class="layui-input-block">
                    <input type="text" id="Hitem_grade" name="Hgrade"
                           autocomplete="off" class="layui-input"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">物品介绍</label>
                <div class="layui-input-block">
                    <textarea id="Hitem_content" name="Hcontent"
                              autocomplete="off" class="layui-input"></textarea>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">物品详图</label>
                <div class="layui-input-block">
                    <input type="text" id="Hitem_img" name="Himg"
                           autocomplete="off" class="layui-input"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">上架时间</label>
                <div class="layui-input-block">
                    <input type="text" id="Hitem_date" name="Hdate"
                           autocomplete="off" class="layui-input"/>
                </div>
            </div>
        </form>
    </div>
</form>
<script src="js/jquery-3.7.1.js"></script>
<script src="layui/layui.js"></script>
<script src="js/ListHitem.js"></script>
</body>

</html>